<?php
/**
 * @file bg-upfile.php
 * @package news
 * @author LD
 * @desc php上传图片
 */
require_once '../settings.php';
global $fileType;

$action = $_POST['action'];

if ($action == 'pub' and  !empty($_FILES) ){
	$tempFile = $_FILES['files']['tmp_name'];
	
	
	
	
	
	
}//END IF


//获取文件后缀名函数
function fileext($filename){
	return substr(strrchr($filename, '.'), 1);
}
//生成随机文件名函数   
function random($length){
	$hash = 'kkyoo-ld-';
	$chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
	$max = strlen($chars) - 1;
	mt_srand((double)microtime() * 1000000);
	for($i = 0; $i < $length; $i++){
		$hash .= $chars[mt_rand(0, $max)];
    }
    return $hash;
}
?>